import local from "../store/local";
import systemInfoUtil from "@/utils/systemInfoUtil.js";
let env = systemInfoUtil.getEnv();
console.log(env, "打印一下环境");

let RELEASE_API_URL = "https://www.besushuo.com";

// let baseURL = local.getBaseUrl() || RELEASE_API_URL;
let baseURL = "";
let oldBaseUrl = "";
let groupBaseUrl = "";
console.log(env, "打印一下环境");
switch (env) {
  case systemInfoUtil.ENV.DEVELOP:
    baseURL = "https://api.yijiangongxiang.com/";
    oldBaseUrl = "https://api.yijiangongxiang.com/";
    groupBaseUrl = "https://api.yijiangongxiang.com/";
    // baseURL = "https://apitest.yijiangongxiang.com/";
    // oldBaseUrl = "https://apitest.yijiangongxiang.com/";
    // groupBaseUrl = "https://apitest.yijiangongxiang.com/";
    break;

  case systemInfoUtil.ENV.TRIAL:
    // baseURL = "https://apitest.yijiangongxiang.com/";
    // oldBaseUrl = "https://apitest.yijiangongxiang.com/";
    // groupBaseUrl = "https://apitest.yijiangongxiang.com/";

    baseURL = "https://api.yijiangongxiang.com/";
    oldBaseUrl = "https://api.yijiangongxiang.com/";
    groupBaseUrl = "https://api.yijiangongxiang.com/";
    break;
  case systemInfoUtil.ENV.RELEASE:
    baseURL = "https://api.yijiangongxiang.com/";
    oldBaseUrl = "https://api.yijiangongxiang.com/";
    groupBaseUrl = "https://api.yijiangongxiang.com/";
    break;
  default:
}

const configAll = {
  rongCloudAppKey: env == "develop" ? "pvxdm17jpwqsr" : "uwd1c0sxuk2z1",
  appId: "wx2e94365245ad0967",
  baseURL: baseURL,
  oldBaseUrl: oldBaseUrl,
  groupBaseUrl: groupBaseUrl,
  wsUrlHost:
    RELEASE_API_URL != baseURL
      ? "wss://www.baisushuo.com:8089"
      : "wss://www.besushuo.com:8089",
  image: {
    ossListFix: "?x-oss-process=image/resize,m_lfit,h_420,w_320",
    ossGoodsList: "?x-oss-process=image/resize,m_lfit,h_420,w_420",
    ossGoodsDetail: "?x-oss-process=image/resize,m_lfit,h_750,w_750",
  },
};
// console.log(configAll);

// console.log(configAll)
export default configAll;
